package cs.android.http;

import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.cookie.Cookie;

import android.graphics.Bitmap;
import cs.java.collections.List;
import cs.java.collections.Map;
import cs.java.json.JSONArray;
import cs.java.json.JSONObject;
import cs.java.json.JSONType;
import cs.java.model.Credentials;

public interface HttpClient extends HttpStatus {

	HttpClient add(String key, Object argument);

	HttpClient addCookie(Cookie cookie);

	HttpClient executeDelete();

	HttpClient executeGet();

	HttpClient executePatch(JSONObject values);

	HttpClient executePost(JSONType values);

	HttpClient executePost(Map<String, String> values);

	Cookie getCookie(int index);

	Cookie getCookie(String name);

	List<Cookie> getCookies();

	HttpResponse getResponse();

	JSONArray getResponseArray();

	Bitmap getResponseBitmap();

	JSONObject getResponseObject();

	int getResponseStatus();

	String getResponseString();

	boolean isResponseOk();

	HttpClient setCredentials(Credentials credentials);

	HttpClient setCredentials(CredentialsProvider provider);

	HttpClient setCredentials(String username, String password);

	void setShowResponseInfo(boolean show);

	HttpClient setUrl(String url);

	void throwExceptionOn(int... statusCodes);

}
